import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'
import Login from '@/components/login.vue'
const ChangePsw = () => import('@/components/changePsw.vue')
const Register = () => import('@/components/register.vue')

const routes:RouteRecordRaw[] = [
  {path:'/',redirect:'/login'},
  {
    path:'/login',
    name:'login',
    component:Login
  },
  {
    path:'/changePsw',
    name:'changePsw',
    component:ChangePsw
  },
  {
    path:'/register',
    name:'register',
    component:Register
  }
]

export const router = createRouter({
  history:createWebHistory(),
  routes
})
